class CustomerDetailModel {
  CustomerDetailHeader customerDetailHeader;
  List<CustomerDetailContent> customerDetailContent;
  CustomerDetailFooter customerDetailFooter;

  CustomerDetailModel(
      {this.customerDetailHeader,
      this.customerDetailContent,
      this.customerDetailFooter});

  CustomerDetailModel.fromJson(Map<String, dynamic> json) {
    customerDetailHeader = json['customerDetailHeader'] != null
        ? new CustomerDetailHeader.fromJson(json['customerDetailHeader'])
        : null;
    if (json['customerDetailContent'] != null) {
      customerDetailContent = new List<CustomerDetailContent>();
      json['customerDetailContent'].forEach((v) {
        customerDetailContent.add(new CustomerDetailContent.fromJson(v));
      });
    }
    customerDetailFooter = json['customerDetailFooter'] != null
        ? new CustomerDetailFooter.fromJson(json['customerDetailFooter'])
        : null;
  }

  Map<String, dynamic> toJson() {
    final Map<String, dynamic> data = new Map<String, dynamic>();
    if (this.customerDetailHeader != null) {
      data['customerDetailHeader'] = this.customerDetailHeader.toJson();
    }
    if (this.customerDetailContent != null) {
      data['customerDetailContent'] =
          this.customerDetailContent.map((v) => v.toJson()).toList();
    }
    if (this.customerDetailFooter != null) {
      data['customerDetailFooter'] = this.customerDetailFooter.toJson();
    }
    return data;
  }
}

class CustomerDetailHeader {
  String avatarUrl;
  String nickName;
  String cardNumber;
  String description;
  String workRecord;

  CustomerDetailHeader(
      {this.avatarUrl,
      this.nickName,
      this.cardNumber,
      this.description,
      this.workRecord});

  CustomerDetailHeader.fromJson(Map<String, dynamic> json) {
    avatarUrl = json['avatarUrl'];
    nickName = json['nickName'];
    cardNumber = json['cardNumber'];
    description = json['description'];
    workRecord = json['workRecord'];
  }

  Map<String, dynamic> toJson() {
    final Map<String, dynamic> data = new Map<String, dynamic>();
    data['avatarUrl'] = this.avatarUrl;
    data['nickName'] = this.nickName;
    data['cardNumber'] = this.cardNumber;
    data['description'] = this.description;
    data['workRecord'] = this.workRecord;
    return data;
  }
}

class CustomerDetailContent {
  String date;
  String content;
  bool isLast;

  CustomerDetailContent({this.date, this.content});

  CustomerDetailContent.fromJson(Map<String, dynamic> json) {
    date = json['date'];
    content = json['content'];
    isLast = json['isLast'];
  }

  Map<String, dynamic> toJson() {
    final Map<String, dynamic> data = new Map<String, dynamic>();
    data['date'] = this.date;
    data['content'] = this.content;
    data['isLast'] = this.isLast;
    return data;
  }
}

class CustomerDetailFooter {
  String money;
  String count;
  String count1;

  CustomerDetailFooter({this.money, this.count, this.count1});

  CustomerDetailFooter.fromJson(Map<String, dynamic> json) {
    money = json['money'];
    count = json['count'];
    count1 = json['count1'];
  }

  Map<String, dynamic> toJson() {
    final Map<String, dynamic> data = new Map<String, dynamic>();
    data['money'] = this.money;
    data['count'] = this.count;
    data['count1'] = this.count1;
    return data;
  }
}
